<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
<script th:src="@{/js/jquery.js}"></script>
<style>
.mycur { background:red}
</style>
</head>
<body>
<div class="container">
	<h1>管理员主页</h1>
	
	<button class="btn btn-success">测试按钮</button>	
	<h1 th:text="${info}">数据=</h1>
	<h1 th:utext="${info}">数据=</h1>
	
	<h1>显示实体</h1>
	<span th:text="${user.uid}">ID</span>
	<span th:text="${user.name}">Name</span>
	<span th:text="${user.pass}">Pass</span>
	<span th:text="${#dates.format(user.birthday,'yyyy-MM-dd hh:mm:ss')}">生日</span>
	
	<h1>显示实体2</h1>
	<div th:object="${user}">
		<span th:text="*{uid}">ID</span>
		<span th:text="*{name}">Name</span>
		<span th:text="*{pass}">Pass</span>
		<span th:text="*{#dates.format(birthday,'yyyy-MM-dd HH:mm:ss')}">生日</span>
	</div>
	<h1>IF 标签</h1>
	登录后可见 <img th:if="${logined!=null}" th:src="@{/img/Teemo.png}" />
	
	<h1>switch标签</h1>
	<div th:switch="${role}">
		<p th:case="admin">管理 员</p>
		<p th:case="teacher">老师</p>
		<p th:case="*">学生</p>
	</div>
	
	<h1>循环显示</h1>
	<table class="table table-striped ">
		<tr>
			<td>ID</td>
			<td>姓名</td>
			<td>密码</td>
			<td>生日</td>
		</tr>
		<tr th:each="stu :  ${students}">
			<td th:text="${stu.uid}">ID</td>
			<td th:text="${stu.name}">姓名</td>
			<td th:text="${stu.pass}">密码</td>
			<td th:text="${stu.birthday}">生日</td>
		</tr>
	</table>
	
	<h1>显示页码  开始5   结束 10</h1>
	<p>
	   v.index
	   v.count
	   v.current
	</p>
	<div>
	    <a href="#" th:each="num,v : ${#numbers.sequence(pa,pb)}" >
	    	<span th:class="${num == pcur}?'mycur':''" th:text="${num}"></span> 
	    </a>
	</div>
	
</div>	
</body>
<script>
$(function(){
	//alert("ok");
});
</script>
</html>